
<div class="formContainer" style="border:0;">
    <%= form_tag activate_inactivate_path, :method => 'get', :id=>'users_search' do %>
  <p style="float: right; width: 318px; margin-right: -12px;"> 
	<%= text_field_tag :search, params[:search], :style=>"width:210px; height:19px; border:#d1d1d1 1px solid; font-style:italic; float:left; margin:3px 0 0 0;", :class=>"hint", :value=>t('user.search') , :onfocus=>"if (this.className=='hint') { this.className = ''; this.value = ''; }", :onblur=>"if (this.value == '') { this.className = 'hint'; this.value = t('user.search'); }"%>	
	<%= submit_tag t('general.search'), :name => nil, :id => "search_users", :class=>'btnBg', :style=>'float:right; margin:0;', :disabled => true %>
  </p>
<% end %>
</div>

<%= form_tag activate_inactivate_path, :method=>"get",:remote=>true, :id=>"question_filter", :class=>"assign_question" do -%>

<h2><%=t('user.filter_user')%></h2>
<div class="formContainer">
            <table class="formTable" style="border:0px;">
              <tr><td>
                <div style="float:left; padding:0px; margin:0 20px 0 0;">
				<label style="float:left; padding-right:10px; width:95px;"><%=t('user.select_user')%>:</label>
				<%= select_tag 'examineeType', options_for_select(@examineeTypes.to_a), :style=>"width:115px; height:19px; border:#d1d1d1 1px solid;" %>
				</div>
                </td></tr> 
            </table>
			<%= submit_tag "Filter", :id=>"filter", :class=>'btnBg' %>
</div><br><br><br>
<%end%>

<div class="updateStatus">
<%= hidden_field_tag "textvalue", @examineeType %>
<span id="activeInactive"><%=render :partial=>"active_inactiveUsers"%></span>
</div>


<script type="text/javascript">	

$(document).ready(function() {
	
	$("#search").on('paste, keydown', function() {
        setTimeout(function(){ 
            if($('#search').val().length > 0) {
	        	$("#search_users").removeAttr("disabled");
	    	}
	    	else{
	    		$("#search_users").css("disabled:disabled;");
	    	}
        },100);
		
	});

  $("#activeInactive .pagination a").live("click", function(){
	
	var link = this.href
	var lastChar = link.substr(link.length - 1);	
	if (lastChar == '#'){
		return false;
	}
	else{
		$.getScript(this.href);
		return false;
	}
   });


  });
  
  </script>

